Clean up deprecated code and simplify validations #2573
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Clean up deprecated code and simplify validations
This PR removes deprecated code and simplifies the validation system in Grape.
Changes
Removed Deprecated Methods
rack_responsemethod: Removed fromGrape::DSL::InsideRoutemoduleerror!insteadRemoved Deprecated Exception Aliases
Grape::Exceptions::MissingGroupTypeError: Removed deprecated alias forMissingGroupTypeGrape::Exceptions::UnsupportedGroupTypeError: Removed deprecated alias forUnsupportedGroupTypeRemoved Deprecated Base Class
Grape::Validations::Base: Removed deprecated base classGrape::Validations::Validators::BaseinsteadSimplified Validation Logic
params_scope.rb: Simplified validation parameter handlingexceptsparameter from validation methodsexcept_valueshandling logicTest Cleanup
deprecated_class_examples.rb: Removed shared spec file for deprecated classesImpact
Breaking Changes
rack_responsemethod: No longer available, useerror!insteadMissingGroupTypeErrorandUnsupportedGroupTypeErrorremovedGrape::Validations::BaseremovedCode Quality Improvements
Migration Guide
For Users of
rack_responseReplace:
With:
For Users of Deprecated Exception Classes
Replace:
With:
For Custom Validators
Replace:
With:
Testing
Related Issues
This cleanup addresses technical debt and removes deprecated code that was marked for removal in previous versions.